﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Bioinformatics.UI
{
    public partial class SplashForm : Form
    {
        private Form _currentForm;
        private bool _exitApplication = false;
        
        public SplashForm()
        {
            InitializeComponent();
        }

        private void uxOpenEntrezBrowser_Click(object sender, EventArgs e)
        {
            Hide();
            uxTaskbarIcon.Visible = true;
            _currentForm = new BrowserForm();
            _currentForm.ShowDialog();
            
            if (_exitApplication)
                Close();
            else
            {
                Show();
                uxTaskbarIcon.Visible = false;
            }
        }

        private void uxExitSuite_Click(object sender, EventArgs e)
        {
            _currentForm.Close();
            _exitApplication = true;
        }

        private void uxReturnToWelcomeCenter_Click(object sender, EventArgs e)
        {
            _currentForm.Close();
        }

        private void uxOpenSequenceAlignment_Click(object sender, EventArgs e)
        {
            Hide();
            uxTaskbarIcon.Visible = true;
            _currentForm = new SequenceAlignmentForm();
            _currentForm.ShowDialog();

            if (_exitApplication)
                Close();
            else
            {
                Show();
                uxTaskbarIcon.Visible = false;
            }
        }
    }
}
